<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="">
    角色名字:<input type="text" name="roleName" id="roleName">
    <div class="zTreeDemoBackground left">
        选择权限：
        <ul id="tree" class="ztree"></ul>
    </div>
</form>
<script type="text/javascript">
    var setting = {
        check: {
            enable: true,
            chkStyle: "checkbox",
            chkboxType: { "Y": "p", "N": "s" }
        },
        async: {
            enable: true,
            url:"/menuController/getTree",
            autoParam:["id", "name=n", "level=lv"],
            otherParam:{"otherParam":"zTreeAsyncTest"}
        }
    };
    $(document).ready(function(){
        $.fn.zTree.init($("#tree"), setting);
    });
</script>
</body>
</html>